<template>
  <div class="root">
    <div class="mianbox">
      <Nav></Nav>
    </div>
    <div class="headerBox">
      <div class="leftBox">
        <img
          class="imgBox"
          src="@/assets/image/header/logo.png"
          @click="$router.push('/home')"
          alt=""
        />
        <div class="titleBox">用户管理后台</div>
      </div>
      <div class="queryBox">
        <div class="leftBox">
          <i class="el-icon-search"></i>
          商品
          <!-- <i class="el-icon-arrow-down"></i> -->
        </div>
        <el-input v-model="input" placeholder=""></el-input>
        <div class="queryBtn" @click="query">搜索</div>
      </div>
    </div>
    <div class="bigContent">
      <div class="contentBox">
        <Cart ref="cart"></Cart>
      </div>
    </div>
    <bottom></bottom>
  </div>
</template>

<script>
import Cart from "@/components/ShoppingCart";
import Nav from "@/components/Nav/Nav";
import bottom from "@/components/bottom";
export default {
  components: { Nav, bottom, Cart },
  data() {
    return {
      input: "",
    };
  },
  methods: {
    // 搜索商品
    query() {
      // this.$router.push({
      //   path: '/commodity',
      //   query: {
      //     goodsName: this.input
      //   }
      // })
      this.$refs.cart.keyWord = this.input;
      this.$refs.cart.selectMemberCartItemList();
    },
  },
};
</script>

<style scoped lang="scss">
.root {
  background: #fff;
  .mianbox {
    margin: 0 auto;
    width: 12rem;
    height: 100%;
  }
  .headerBox {
    padding-left: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-bottom: 10px;
    .leftBox {
      display: flex;
      align-items: center;
    }
    .imgBox {
      cursor: pointer;
    }
    .titleBox {
      margin-left: 100px;
      font-size: 24px;
      font-weight: 500;
      color: #444242;
    }
    .queryBox {
      display: flex;
      align-items: center;
      border-radius: 40px;
      width: 4rem;
      background: #ebebeb;
      margin-right: 80px;
      overflow: hidden;
      .leftBox {
        background: #f5f7f9;
        display: flex;
        align-items: center;
        padding: 0 12px;
        font-size: 14px;
        height: 43px;
        line-height: 43px;
        /deep/ .el-icon-search {
          margin-right: 10px;
        }
        /deep/ .el-icon-arrow-down {
          margin-left: 10px;
        }
      }
      /deep/ .el-input__inner {
        border: none;
        background: #ebebeb;
      }
      /deep/ .el-input {
        width: 52%;
      }
      .queryBtn {
        text-align: center;
        background: #e22a1f;
        color: #fff;
        font-size: 16px;
        flex: 1;
        height: 43px;
        line-height: 43px;
        border-radius: 40px;
        cursor: pointer;
      }
    }
  }
  .bigContent {
    background: #f5f7f9;
    padding: 0.2rem 0;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1) inset;
  }
  .contentBox {
    width: 60%;
    margin: auto;
    background: #fff;
    border-radius: 4px;
  }
}
</style>
<style scoped lang="scss">
@media screen and (max-width: 1300px) {
  .queryBox {
    width: 6rem !important;
  }
  .contentBox {
    width: 90% !important;
  }
}
</style>